import request from '@/utils/request'

// 用户列表
export function userList(data) {
  return request({
    url: '/generator/user/search',
    method: 'post',
    data: data,
  })
}

// 禁用用户
export function disableUser(data) {
  return request({
    url: '/generator/user/disable',
    method: 'post',
    data: data,
  })
}

// 解封用户
export function releaseUser(data) {
  return request({
    url: '/generator/user/release',
    method: 'post',
    data: data,
  })
}

// 删除用户
export function deleteUser(data) {
  return request({
    url: '/generator/user/delete',
    method: 'post',
    data: data,
  })
}

// 修改用户
export function updateUser(data) {
  return request({
    url: '/generator/user/update',
    method: 'post',
    data: data,
  })
}

// 算法列表
export function algoList(data) {
  return request({
    url: '/algorithms/search',
    method: 'get',
    params: data,
  })
}

// 删除算法
export function deleteAlgo(data) {
  return request({
    url: '/algorithms/delete',
    method: 'post',
    params: data,
  })
}

// 上传算法
export function saveAlgo(data) {
  return request({
    url: '/generator/publicalgo/save',
    method: 'post',
    data: data,
  })
}

// 模版列表
export function modelList() {
  return request({
    url: '/generator/architectmodel/list',
    method: 'get',
  })
}

// 删除模版
export function deleteModel(data) {
  return request({
    url: '/generator/architectmodel/delete',
    method: 'post',
    data: data,
  })
}
